package com.examples.spider;

import java.io.*;

/**
 * @author feilong.gao
 * @date 2022/1/11 17:59
 */
public class GitBook2TXT {

/**
 * # [斗罗大陆III龙王传说](http://www.tangsanshu.com/longwangchuanshuo/)
 * ## 目录
 * * [楔子](chapter\8428103b645f7433709d7a9ebcdea8ca.md)
 * * [第一章 觉醒日](chapter\044ad94189a994e9244c404146ed6f92.md)
 */


public void gitBook2txt(){
    File file = new File("D:\\龙王传说\\www.tangsanshu.com\\SUMMARY.md");
    BufferedReader reader = null;
    try {
        reader = new BufferedReader(new FileReader(file));
        String tempString = null;
        // 一次读入一行，直到读入null为文件结束
        while ((tempString = reader.readLine()) != null) {
            // 显示行号
            System.out.println("tempString");

        }
        reader.close();
    } catch (IOException e) {
        e.printStackTrace();
    } finally {
        if (reader != null) {
            try {
                reader.close();
            } catch (IOException e1) {
            }
        }
    }
}

}
